<div id="nav_div">
<form>
  <span style='color:white'>Search By Main Ingredient&nbsp;&nbsp;<input type='text' ></input>
  <input type='submit' value='Search'></input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  Search By Title&nbsp;&nbsp;<input type='text' ></input>
  <input type='submit' value='Search'></input>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search By Category</span>&nbsp;&nbsp;
  <%= select ("recipe", "category_id", @categories.map {|u| [u.category,u.id]}) %>	

</form>
</div>
<div class="select_div">
  <%= link_to '++ New Recipe ++', new_recipe_path %>
  &nbsp;&nbsp;&nbsp;&nbsp;<%= link_to '++ New Category ++', categories_path %>
</div>
<table id="main_table">
  <table id="three_column_table">
    <tr>

      <td id="left_column">&nbsp;</td>
      
      <td id="center_column" class="center">
        
	<table id="recipe_listing_table">
	<colgroup span='4'><col width='200'><col width='200'><col width='150'><col width='200'></colgroup>
	  <tr><td colspan='4' id="spacer_column"></td></tr>
	  <tr>
	    <td class="recipe_heading">
	      <%= link_to "Recipe", :action => "index", :by => "tit" %> 
	    </td>
	    <td class="recipe_heading">
	      <%= link_to "Category", :action => "index", :by => "cat" %>
	    </td>
	    <td class="recipe_heading">
	      <%= link_to "Rating", :action => "index", :by => "rat" %>
	    </td>
	    <td class="recipe_heading">
	      <%= link_to "Last Used Date", :action => "index", :by => "dat" %>
	    </td>
	  </tr>
	    <% @recipe_number = 1 %>
	    <% for recipe in @recipes %>
	  <tr>
	    <td class="left"><%= link_to recipe.title, recipe, :id => "recipe_title_link" %></td>
	    <td class="left"><% if recipe.category.category != nil %><%= recipe.category.category %><% else %>
	    Uncategorized <% end %> 
	    </td>
	    <td class="left">
              <% for i in (1..5) %>
	      <% @current_recipe = "recipe" + @recipe_number.to_s() %>
	      <% if recipe.rating == i %><%= radio_button(@current_recipe, "rating", i, :class => "star", :checked => "checked", :disabled => "disabled") %>
	      <% else %><%= radio_button(@current_recipe, "rating", i, :class => "star", :disabled => "disabled") %><% end %><% end %>
	    </td>
	    <td style='padding-left: 45px'>
	       <input name="recipe[lastdate]" id="<%=h recipe.id %>" style='width: 90px' class="date-pick" value='<%= recipe.lastdate %>'/>
	    </td>
	  </tr>
	    <% @recipe_number += 1 %>
	    <% end %>
	</table>

      </td>
      
      <td id="right_column">&nbsp;</td>
    
    </tr>
  </table>
</table>